#include "iap.h"
#include "W25Q64.h"

int is_need_update(void)
{
	unsigned char magic_array[4]= {0x00,0x00,0x00,0x00};
	unsigned int magic =0x00000000;
	unsigned char i;
	
	SPI_Flash_Read(magic_array,MAGIC_ADDR,sizeof(magic_array));
	
	for(i=0;i<4;i++)
	{
		magic |=  ((unsigned int)magic_array[i] << (8*i));
	}
	
	if( magic==MAGIC)
	{
		return 0;
	}
	else
	{
		return 1;
	}
	
	return 1;
}

int move_app_bin()
{
	return 0;
}







